package com.zhongkai.model3;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

/**
 * 派单记录
 * */
@Entity
@Table(name = "send_date", schema = "air", catalog = "")
public class SendDate implements Serializable {
    private Long id;
    private String sendName;  //派单人员姓名
    private String sendUuid;  //派单人员 uuid
    private String resolveName; //接单人员姓名
    private String resolveUuid;  //接单人员uuid
    private Long sendTime;  //派单时间
    private Long resolveTime; //完成时间
    private Integer solve;  //是否完成
    private String warCause;  //异常原因
    private String address; //设备地址
    private String unitUuid; //设备uuid
    private String anoId; //订单编号


    @Basic
    @Column(name = "ano_id")
    public String getAnoId() {
        return anoId;
    }

    public void setAnoId(String anoId) {
        this.anoId = anoId;
    }

    @Id
    @GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "send_name")
    public String getSendName() {
        return sendName;
    }

    public void setSendName(String sendName) {
        this.sendName = sendName;
    }

    @Basic
    @Column(name = "send_uuid")
    public String getSendUuid() {
        return sendUuid;
    }

    public void setSendUuid(String sendUuid) {
        this.sendUuid = sendUuid;
    }

    @Basic
    @Column(name = "resolve_name")
    public String getResolveName() {
        return resolveName;
    }

    public void setResolveName(String resolveName) {
        this.resolveName = resolveName;
    }

    @Basic
    @Column(name = "resolve_uuid")
    public String getResolveUuid() {
        return resolveUuid;
    }

    public void setResolveUuid(String resolveUuid) {
        this.resolveUuid = resolveUuid;
    }

    @Basic
    @Column(name = "send_time")
    public Long getSendTime() {
        return sendTime;
    }

    public void setSendTime(Long sendTime) {
        this.sendTime = sendTime;
    }

    @Basic
    @Column(name = "resolve_time")
    public Long getResolveTime() {
        return resolveTime;
    }

    public void setResolveTime(Long resolveTime) {
        this.resolveTime = resolveTime;
    }

    @Basic
    @Column(name = "solve")
    public Integer getSolve() {
        return solve;
    }

    public void setSolve(Integer solve) {
        this.solve = solve;
    }

    @Basic
    @Column(name = "war_cause")
    public String getWarCause() {
        return warCause;
    }

    public void setWarCause(String warCause) {
        this.warCause = warCause;
    }

    @Basic
    @Column(name = "address")
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Basic
    @Column(name = "unit_uuid")
    public String getUnitUuid() {
        return unitUuid;
    }

    public void setUnitUuid(String unitUuid) {
        this.unitUuid = unitUuid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SendDate sendDate = (SendDate) o;
        return Objects.equals(id, sendDate.id) &&
                Objects.equals(sendName, sendDate.sendName) &&
                Objects.equals(sendUuid, sendDate.sendUuid) &&
                Objects.equals(resolveName, sendDate.resolveName) &&
                Objects.equals(resolveUuid, sendDate.resolveUuid) &&
                Objects.equals(sendTime, sendDate.sendTime) &&
                Objects.equals(resolveTime, sendDate.resolveTime) &&
                Objects.equals(solve, sendDate.solve) &&
                Objects.equals(warCause, sendDate.warCause) &&
                Objects.equals(address, sendDate.address) &&
                Objects.equals(unitUuid, sendDate.unitUuid);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, sendName, sendUuid, resolveName, resolveUuid, sendTime, resolveTime, solve, warCause, address, unitUuid);
    }
}
